# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=konsole
pkgver=20.04.3
pkgrel=0
arch="all !armhf" # armhf blocked by qt5-qtdeclarative
url="https://kde.org/applications/system/konsole"
pkgdesc="KDE's terminal emulator"
license="GPL-2.0-only AND LGPL-2.1-or-later AND Unicode-DFS-2016"
depends="ncurses-terminfo-base"
makedepends="extra-cmake-modules qt5-qtbase-dev kbookmarks-dev kcompletion-dev
	kconfig-dev kconfigwidgets-dev kcoreaddons-dev kcrash-dev kguiaddons-dev
	kdbusaddons-dev ki18n-dev kiconthemes-dev kinit-dev kio-dev knewstuff-dev
	knotifications-dev knotifyconfig-dev kparts-dev kpty-dev kservice-dev
	ktextwidgets-dev kwidgetsaddons-dev kwindowsystem-dev kxmlgui-dev
	kglobalaccel-dev kdoctools-dev"
checkdepends="xvfb-run"
source="https://download.kde.org/stable/release-service/$pkgver/src/konsole-$pkgver.tar.xz"
subpackages="$pkgname-doc $pkgname-lang"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	# DBusTest requires running DBus
	CTEST_OUTPUT_ON_FAILURE=TRUE xvfb-run ctest -E "DBusTest"
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}

sha512sums="37607f7aab099b48478179eeb7e40e25a75c3c0b1b20496ae34ccd883d6f30644206d7ee95ebd56e9620b88b80700a03157671dfecf538767e6cad476632d813  konsole-20.04.3.tar.xz"
